package com.project.petLossSystem.service;

import com.project.petLossSystem.po.AddressCategory;
import com.project.petLossSystem.util.PageQueryUtil;
import com.project.petLossSystem.util.PageResult;
import com.project.petLossSystem.vo.addressCategory.FirstAddressCategoryVO;
import com.project.petLossSystem.vo.addressCategory.SecondAddressCategoryVO;
import com.project.petLossSystem.vo.addressCategory.ThirdAddressCategoryVO;

import java.util.List;

public interface AddressCategoryService {
    // 后台分页
    PageResult getAddressPage(PageQueryUtil pageQueryUtil);

    // 插入
    String insertAddresses(Integer parentId, Byte addressLevel, String[] addressNames);

    // 更新单个地址
    String updateAddress(AddressCategory addressCategory);

    // 根据id获取地址
    AddressCategory getAddressById(Integer addressId);

    List<Integer> getIdListByParentIds(List<Integer> addressIds); // 删除时需要

    // 更新deleted状态
    boolean updateDeleted(List<Integer> addressIds);

    // 分类显示
    List<FirstAddressCategoryVO> getAddressesForSelect();

    // 一级地址查询二、三级地址
    List<SecondAddressCategoryVO> getSecondAddresses(Integer addressId);

    // 二级地址查询三级地址
    List<ThirdAddressCategoryVO> getThirdAddresses(Integer addressId);
}
